package com.leyou.comment.pojo;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Document("comment")
@Data
public class Comment {
    @Id
    private Long commentId;  //评论ID
    private Long userId;     //用户ID
    private String userName;  //用户名
    private Integer score;   //商品评分
    private String content;   //评论内容
    private Integer likeNum;  //点赞数
    private Long parentId;   //回复的用户ID
    private String ownSpec;  //商品下标
    private List<String> images;  //晒图图片
    private String addContent;  //追加评论
    private int addCount;   //追加评论次数   上限为1
    private Map<Long,CommentChild> commentChildren;  //子评论
    @Indexed
    private Long spuId;
    @Indexed
    private Long skuId;
    private Date createTime;  //评论时间
    private Date addTime;  //追加评论时间
}
